package com.iuie.ns.system.vo.code;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.iuie.ns.frame.annotation.SheetColumnDefine;

/**
 * 码值
 * @author lj
 * @createTime 2017年1月18日 上午9:32:58
 */
@Table(name="SYS_CODE_INFO")
@Entity
public class SysCodeInfoVO implements Serializable {
    
    private static final long serialVersionUID = -1037601777431413302L;

    @Id
    @GeneratedValue(generator = "id_generator")    
    @GenericGenerator(name = "id_generator", strategy = "assigned")  
    private String id;
	
    @SheetColumnDefine(name="码值名称", weight=1)
	@Column(name="CODE_INFO_NAME")
	private String codeInfoName; // 码值中文名称
	
    @SheetColumnDefine(name="码值", weight=2)
	@Column(name="CODE_INFO_VALUE",length=12)
	private String codeInfoValue; // 码值
	
	@SheetColumnDefine(name="状态", weight=3)
	@Column
	private Integer state; // 状态 0:禁用，1:启用
	
	@ManyToOne(fetch=FetchType.LAZY)
	private SysCodeTypeVO codeType; // 码值类型 
	
	private Integer orderNumber; // 序号，顺序
	
	private String ext1; // 额外1
	/**
	 * @return the codeInfoName
	 */
	public String getCodeInfoName() {
		return codeInfoName;
	}
	/**
	 * @param codeInfoName the codeInfoName to set
	 */
	public void setCodeInfoName(String codeInfoName) {
		this.codeInfoName = codeInfoName;
	}
	/**
	 * @return the codeInfoValue
	 */
	public String getCodeInfoValue() {
		return codeInfoValue;
	}
	/**
	 * @param codeInfoValue the codeInfoValue to set
	 */
	public void setCodeInfoValue(String codeInfoValue) {
		this.codeInfoValue = codeInfoValue;
	}
	/**
	 * @return the state
	 */
	public Integer getState() {
		return state;
	}
	/**
	 * @param state the state to set
	 */
	public void setState(Integer state) {
		this.state = state;
	}
	/**
	 * @return the codeType
	 */
	public SysCodeTypeVO getCodeType() {
		return codeType;
	}
	/**
	 * @param codeType the codeType to set
	 */
	public void setCodeType(SysCodeTypeVO codeType) {
		this.codeType = codeType;
	}
	/**
     * @return the orderNumber
     */
    public Integer getOrderNumber() {
        return orderNumber;
    }
    /**
     * @param orderNumber the orderNumber to set
     */
    public void setOrderNumber(Integer orderNumber) {
        this.orderNumber = orderNumber;
    }
    /**
     * @return the ext1
     */
    public String getExt1() {
        return ext1;
    }
    /**
     * @param ext1 the ext1 to set
     */
    public void setExt1(String ext1) {
        this.ext1 = ext1;
    }
    
    /**
     * @return the id
     */
    public String getId() {
        return id;
    }
    
    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }
    
    @Override
    public String toString() {
        return "SysCodeInfoVO [codeInfoName=" + codeInfoName + ", codeInfoValue=" + codeInfoValue + ", state=" + state + ", codeType=" + codeType + ", orderNumber=" + orderNumber
                + ", ext1=" + ext1 + "]";
    }
    
}